package org.jeecg.modules.fep.untils;

import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.math.RandomUtils;
import org.jeecg.common.handler.IFillRuleHandler;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Title jeecg-boot
 * @Package org.jeecg.modules.demo.fep.untils
 * @Describe 生成订单号
 * This program is protected by copyright laws
 * @Author ZJ
 * @Date 2023/4/15 00:00
 * @Version 1.0
 **/
public class OrderNumberRule  {

    public String execute( ) {
        String prefix = "WB";

        SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss");
        int random = RandomUtils.nextInt(90) + 10;
        String value = prefix + format.format(new Date()) + random;
        // 根据formData的值的不同，生成不同的订单号

        return value;
    }

}
